package com.example.friend.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.example.core.domain.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
* <p>
*
* </p>
*
* @author 49940
* @date 2024年01月16日 16:02:55
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_question")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Question extends BaseEntity {

	@JsonSerialize(using = ToStringSerializer.class)
	@TableId(value = "QUESTION_ID", type = IdType.ASSIGN_ID)
	@Schema(description = "题目id")
	private Long questionId;

//	@JsonSerialize(using = ToStringSerializer.class)
//	@Schema(description = "竞赛id")
//	private Long examId;

	@Schema(description = "题目标题")
	private String title;

	@Schema(description = "题目内容")
	private String content;

	@Schema(description = "默认代码块")
	private String defaultCode;

//	@Schema(description = "题目答案")
//	private String answer;

	@Schema(description = "题目用例")
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private String questionCase;

	@Schema(description = "时间限制")
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private Long timeLimit;

	@Schema(description = "空间限制")
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	private Long spaceLimit;

	@Schema(description = "题目难度")
	private Integer difficulty;
}